package com.lyn.common.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel(value = "Result",description = "返回数据结果")
public class Result<T> {
	
	@ApiModelProperty(value = "返回结果代码。10000-成功；90000-失败",allowableValues="10000,90000",example = "10000",required = true)
	private Integer code;
	@ApiModelProperty(value = "返回结果消息",required = true)
	private String message;
	@ApiModelProperty(value = "返回结果数据",required = false)
	private T data;
	
	public Result() {
		super();
	}
	
	public Result(Integer code, String message) {
		super();
		this.code = code;
		this.message = message;
		this.data = null;
	}
	
	public Result(Integer code, String message, T data) {
		super();
		this.code = code;
		this.message = message;
		this.data = data;
	}
	public Integer getCode() {
		return code;
	}
	public void setCode(Integer code) {
		this.code = code;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public T getData() {
		return data;
	}
	public void setData(T data) {
		this.data = data;
	}
	
	
}
